<template>
  <quick-layout
    ref="Instance"
    :is-operate-btn="true"
    :is-operate="true"
    :data-list-url="dataListUrl"
    :delete-url="deleteUrl"
    :export-url="exportUrl"
    :import-url="importUrl"
    table-title="法律法规"
    :is-row-model="true"
    label-width="150px"
    size="small"
    @edit="handleEdit"
    @created="handleEdit(null)"
  >
    <template v-slot:query="{query,reset}">
      <query-item label="模糊查询">
        <el-input v-model="query.keyword" style="width: 270px" placeholder="请输入关键词..." />
      </query-item>
      <query-item label="ID" prop="id">
        <el-input v-model="query.id" placeholder="ID" />
      </query-item>
      <query-item label="业务主键" prop="businessKey">
        <el-input v-model="query.businessKey" placeholder="业务主键" />
      </query-item>
      <query-item label="附件ID" prop="attachId">
        <el-input v-model="query.attachId" placeholder="附件ID" />
      </query-item>
      <query-item label="文件分类" prop="category">
        <el-input v-model="query.category" placeholder="文件分类" />
      </query-item>
      <query-item label="文件名称" prop="name">
        <el-input v-model="query.name" placeholder="文件名称" />
      </query-item>
      <query-item label="文件地址" prop="fileUrl">
        <el-input v-model="query.fileUrl" placeholder="文件地址" />
      </query-item>
      <query-item label="备注" prop="remark">
        <el-input v-model="query.remark" placeholder="备注" />
      </query-item>
      <query-item label="最新反馈意见" prop="latestFeedback">
        <el-input v-model="query.latestFeedback" placeholder="最新反馈意见" />
      </query-item>
      <query-item label="最新反馈意见日期" prop="latestFeedbackDate">
        <el-input v-model="query.latestFeedbackDate" placeholder="最新反馈意见日期" />
      </query-item>
      <query-item label="最新处理结果" prop="latestHandlerResult">
        <el-input v-model="query.latestHandlerResult" placeholder="最新处理结果" />
      </query-item>
      <query-item label="最新处理日期" prop="latestHandlerDate">
        <el-input v-model="query.latestHandlerDate" placeholder="最新处理日期" />
      </query-item>
      <query-item label="流程状态" prop="processStatus">
        <el-input v-model="query.processStatus" placeholder="流程状态" />
      </query-item>
      <query-item label="关闭日期" prop="closeDate">
        <el-input v-model="query.closeDate" placeholder="关闭日期" />
      </query-item>
      <query-item label="创建人工号" prop="createdUserCode">
        <el-input v-model="query.createdUserCode" placeholder="创建人工号" />
      </query-item>
      <query-item label="创建人姓名" prop="createdUserName">
        <el-input v-model="query.createdUserName" placeholder="创建人姓名" />
      </query-item>
      <query-item label="创建时间" prop="createdTime">
        <el-input v-model="query.createdTime" placeholder="创建时间" />
      </query-item>
      <query-item label="修改人工号" prop="updatedUserCode">
        <el-input v-model="query.updatedUserCode" placeholder="修改人工号" />
      </query-item>
      <query-item label="修改人姓名" prop="updatedUserName">
        <el-input v-model="query.updatedUserName" placeholder="修改人姓名" />
      </query-item>
      <query-item label="修改时间" prop="updatedTime">
        <el-input v-model="query.updatedTime" placeholder="修改时间" />
      </query-item>
      <query-item label="删除标志" prop="delFlag">
        <el-input v-model="query.delFlag" placeholder="删除标志" />
      </query-item>
    </template>
    <template>
      <el-table-column type="selection" header-align="center" align="center" width="50" />
      <el-table-column prop="id" label="ID" header-align="center" align="center" />
      <el-table-column prop="businessKey" label="业务主键" header-align="center" align="center" />
      <el-table-column prop="attachId" label="附件ID" header-align="center" align="center" />
      <el-table-column prop="category" label="文件分类" header-align="center" align="center" />
      <el-table-column prop="name" label="文件名称" header-align="center" align="center" />
      <el-table-column prop="fileUrl" label="文件地址" header-align="center" align="center" />
      <el-table-column prop="remark" label="备注" header-align="center" align="center" />
      <el-table-column prop="latestFeedback" label="最新反馈意见" header-align="center" align="center" />
      <el-table-column prop="latestFeedbackDate" label="最新反馈意见日期" header-align="center" align="center" />
      <el-table-column prop="latestHandlerResult" label="最新处理结果" header-align="center" align="center" />
      <el-table-column prop="latestHandlerDate" label="最新处理日期" header-align="center" align="center" />
      <el-table-column prop="processStatus" label="流程状态" header-align="center" align="center" />
      <el-table-column prop="closeDate" label="关闭日期" header-align="center" align="center" />
      <el-table-column prop="createdUserCode" label="创建人工号" header-align="center" align="center" />
      <el-table-column prop="createdUserName" label="创建人姓名" header-align="center" align="center" />
      <el-table-column prop="createdTime" label="创建时间" header-align="center" align="center" />
      <el-table-column prop="updatedUserCode" label="修改人工号" header-align="center" align="center" />
      <el-table-column prop="updatedUserName" label="修改人姓名" header-align="center" align="center" />
      <el-table-column prop="updatedTime" label="修改时间" header-align="center" align="center" />
      <el-table-column prop="delFlag" label="删除标志" header-align="center" align="center" />
    </template>
    <template #component>
      <add-or-update ref="addOrUpdateRef" @refreshDataList="getDataList" />
    </template>
  </quick-layout>
</template>

<script>
import AddOrUpdate from './add-or-update.vue'
import QuickLayout from '@/components/EmpsLayout/index.vue'
import QueryItem from '@/components/QueryItem/index.vue'

export default {
  name: 'LawsRegulations',
  components: { QuickLayout, QueryItem, AddOrUpdate },
  data() {
    return {
      dataListUrl: '/business/laws_regulations/page',
      deleteUrl: '/business/laws_regulations',
      exportUrl: '/business/laws_regulations/export',
      importUrl: '/business/laws_regulations/import',
      businessEnum: []
    }
  },
  created() {
    this.getBusinessEnum()
  },
  methods: {
    getInstance() {
      return this.$ref.Instance
    },
    handleEdit(id) {
      this.$refs.addOrUpdateRef.init(id)
    },
    getDataList() {
      this.getInstance().query()
    }
  }
}
</script>
